import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

/* Layout */
import Layout from "@/layout";
import LayoutV2 from "@/layout-v2";

/**
 * Note: 路由配置项
 *
 * hidden: true                     // 当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
 * alwaysShow: true                 // 当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
 *                                  // 只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
 *                                  // 若你想不管路由下面的 children 声明的个数都显示你的根路由
 *                                  // 你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
 * redirect: noRedirect             // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
 * name:'router-name'               // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
 * meta : {
    noCache: true                   // 如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
    title: 'title'                  // 设置该路由在侧边栏和面包屑中展示的名字
    icon: 'svg-name'                // 设置该路由的图标，对应路径src/assets/icons/svg
    breadcrumb: false               // 如果设置为false，则不会在breadcrumb面包屑中显示
    activeMenu: '/system/user'      // 当路由设置了该属性，则会高亮相对应的侧边栏。
  }
 */

// 公共路由
export const constantRoutes = [{
		path: "/index",
		component: Layout,
		redirect: "/home",
		// children: [
		//   {
		//     path: "/redirect/:path(.*)",
		//     component: (resolve) => require(["@/views/redirect"], resolve),
		//   },
		// ],
	},
	{
		path: "/login",
		component: (resolve) => require(["@/views/login"], resolve),
		hidden: true,
	},
	{
		path: "/nurRegister",
		component: (resolve) => require(["@/views/frontuser/nurseadd/index"], resolve),
		hidden: true,
	},
	{
		path: "/docRegister",
		component: (resolve) => require(["@/views/frontuser/docadduser/index"], resolve),
		hidden: true,
	},
	{
		path: "/hosRegister",
		component: (resolve) => require(["@/views/frontuser/hosadduser/index"], resolve),
		hidden: true,
	},
	{
		path: "/register",
		component: (resolve) => require(["@/views/register"], resolve),
		hidden: true,
	},
	{
		path: "/404",
		component: (resolve) => require(["@/views/error/404"], resolve),
		hidden: true,
	},
	{
		path: "/401",
		component: (resolve) => require(["@/views/error/401"], resolve),
		hidden: true,
	},
	{
		path: "",
		component: Layout,
		redirect: "index",
		children: [{
			path: "index",
			component: (resolve) => require(["@/views/index"], resolve),
			name: "Index",
			meta: {
				title: "数据大屏",
				icon: "dashboard",
				affix: true
			},
		}, ],
	},
	{
		path: "",
		component: LayoutV2,
		redirect: "",
		children: [{
				path: "home",
				component: (resolve) => require(["@/views/home/index.vue"], resolve),
				name: "Home",
				meta: {
					title: "数据大屏",
					icon: "dashboard",
					affix: true,
					nav: '数据大屏'
				},
			},
			{
				path: "medical-staff-detail",
				component: (resolve) =>
					require(["@/views/medical-staff-detail/index"], resolve),
				name: "MedicalStaffDetail",
				meta: {
					title: "医务人员详情",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "医务人员资质",
							path: "",
						},
						{
							name: "详情",
						},
					],
				},
			},
			{
				path: "detail",
				component: (resolve) =>
					require(["@/views/dw/pages/organization/detail"], resolve),
				name: "organizationDetail",
				meta: {
					title: "医务人员详情",

				},
			},
			{
				path: "warningDetail",
				component: (resolve) =>
					require(["@/views/dw/pages/warning/detail"], resolve),
				name: "warningDetail",
				meta: {
					title: "详情",

				},
			},
			{
				path: "prescriptionDetail",
				component: (resolve) =>
					require(["@/views/dw/pages/prescription/detail"], resolve),
				name: "prescriptionDetail",
				meta: {
					title: "详情",

				},
			},
			{
				path: "nurseDetail",
				component: (resolve) =>
					require(["@/views/dw/pages/nurse/detail"], resolve),
				name: "nurseDetail",
				meta: {
					title: "详情",

				},
			},
			{
				path: "physicianDetail",
				component: (resolve) =>
					require(["@/views/dw/pages/physician/detail"], resolve),
				name: "physicianDetail",
				meta: {
					title: "详情",

				},
			},
			{
				path: "organizationList",
				component: (resolve) =>
					require(["@/views/dw/pages/organization/list"], resolve),
				name: "organizationList",
				meta: {
					title: "医院列表",

				},
			},
			{
				path: "outpatientDetail",
				component: (resolve) =>
					require(["@/views/dw/pages/outpatient/detail"], resolve),
				name: "outpatientDetail",
				meta: {
					title: "详情",

				},
			},
			{
				path: "data-warehouse",
				component: (resolve) =>
					require(["@/views/data-warehouse/index"], resolve),
				name: "DataWarehouse",
				meta: {
					title: "数据仓库",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "数据汇总",
						},
					],
				},
			},

			{
				path: "medical-staff-list",
				component: (resolve) =>
					require(["@/views/medical-staff-list/index"], resolve),
				name: "MedicalStaffList",
				meta: {
					title: "医务人员资质",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "医务人员资质",
							path: "",
						},
					],
				},
			},
			{
				path: "organization-list",
				component: (resolve) =>
					require(["@/views/orgnization-list/index"], resolve),
				name: "OrganizationList",
				meta: {
					title: "医疗机构列表",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "医疗机构列表",
							path: "",
						},
					],
				},
			},
			{
				path: "pharmaceutical-ingredient",
				component: (resolve) =>
					require(["@/views/pharmaceutical-ingredient/index"], resolve),
				name: "PharmaceuticalIngredient",
				meta: {
					title: "药品成分库",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "药品成分库",
							path: "",
						},
					],
				},
			},
			{
				path: "pre-warning-list",
				component: (resolve) =>
					require(["@/views/pre-warning-list/index"], resolve),
				name: "PreWarningList",
				meta: {
					title: "预警类型列表",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "预警类型列表",
							path: "",
						},
					],
				},
			},
			{
				path: "outpatient-list",
				component: (resolve) =>
					require(["@/views/outpatient-list/index"], resolve),
				name: "OutpatientList",
				meta: {
					title: "就诊列表",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "就诊列表",
							path: "",
						},
					],
				},
			},
			{
				path: "prescription-list",
				component: (resolve) =>
					require(["@/views/prescription-list/index"], resolve),
				name: "PrescriptionList",
				meta: {
					title: "处方列表",
					breadCrumb: [{
							name: "数据仓库",
							path: "",
						},
						{
							name: "处方列表",
							path: "",
						},
					],
				},
			},
			{
				path: "pre-warning-management",
				component: (resolve) =>
					require(["@/views/pre-warning-management/index"], resolve),
				name: "PreWraningStatistics",
				redirect: '/pre-warning-management/check-overdue',
				meta: {
					title: "预警管理",
				},
				children: [{
						path: 'check-overdue',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/check-overdue/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "校验逾期预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'license-overdue',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/license-overdue/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "执业许可证逾期预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'child-warn/23',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/child-warn/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "无抗菌药物处方权预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'child-warn/12',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/child-warn/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "儿科超范围预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'clinic-drug',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/clinic-drug/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "门诊使用特殊级抗菌药物",
									path: "",
								},
							],
						}
					},
					{
						path: 'venous-transfusion',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/venous-transfusion/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "抗菌药物静脉输液",
									path: "",
								},
							],
						}
					},
					{
						path: 'medical-document',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/medical-document/index"
						], resolve),
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "非医师本人填写医疗文书",
									path: "",
								},
							],
						}
					},
					{
						path: 'prescription-right',
						component: (resolve) => require([
							"@/views/pre-warning-management/pages/prescription-right/index"
						], resolve),
						redirect: '/pre-warning-management/prescription-right/list',
						meta: {
							title: "预警管理",
							nav: "预警详情",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "无抗菌处方权预警",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require([
									"@/views/pre-warning-management/pages/prescription-right/list"
								], resolve),
								meta: {
									title: "预警管理",
									nav: "预警详情",
									breadCrumb: [{
											name: "预警管理",
											path: "",
										},
										{
											name: "无抗菌处方权预警",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require([
									"@/views/pre-warning-management/pages/prescription-right/detail"
								], resolve),
								meta: {
									title: "预警管理",
									nav: "预警详情",
									breadCrumb: [{
											name: "预警管理",
											path: "",
										},
										{
											name: "无抗菌处方权预警",
											path: "",
										},
									],
								},
							}
						]
					}
				]
			},
			{
				path: "reply",
				component: (resolve) =>
					require(["@/views/reply/index"], resolve),
				name: "myPreWraningStatistics",
				redirect: '/reply/mycheck-overdue',
				meta: {
					title: "我的预警",
				},
				children: [{
						path: 'mycheck-overdue',
						component: (resolve) => require(["@/views/reply/pages/mycheck-overdue/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "校验逾期预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'mylicense-overdue',
						component: (resolve) => require(["@/views/reply/pages/mylicense-overdue/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "执业许可证逾期预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'myphysician-skip-level',
						component: (resolve) => require([
							"@/views/reply/pages/myphysician-skip-level/index"], resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "无抗菌药物处方权预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'mychild-warn',
						component: (resolve) => require(["@/views/reply/pages/mychild-warn/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "儿科超范围预警",
									path: "",
								},
							],
						}
					},
					{
						path: 'myclinic-drug',
						component: (resolve) => require(["@/views/reply/pages/myclinic-drug/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "门诊使用特殊级抗菌药物",
									path: "",
								},
							],
						}
					},
					{
						path: 'myvenous-transfusion',
						component: (resolve) => require(["@/views/reply/pages/myvenous-transfusion/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "抗菌药物静脉输液",
									path: "",
								},
							],
						}
					},
					{
						path: 'mymedical-document',
						component: (resolve) => require(["@/views/reply/pages/mymedical-document/index"],
							resolve),
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "非医师本人填写医疗文书",
									path: "",
								},
							],
						}
					},
					{
						path: 'myprescription-right',
						component: (resolve) => require(["@/views/reply/pages/myprescription-right/index"],
							resolve),
						redirect: '/reply/prescription-right/list',
						meta: {
							title: "预警管理",
							nav: "我的预警",
							breadCrumb: [{
									name: "预警管理",
									path: "",
								},
								{
									name: "无抗菌处方权预警",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require([
									"@/views/reply/pages/myprescription-right/list"
								], resolve),
								meta: {
									title: "预警管理",
									nav: "我的预警",
									breadCrumb: [{
											name: "预警管理",
											path: "",
										},
										{
											name: "无抗菌处方权预警",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require([
									"@/views/reply/pages/myprescription-right/detail"
								], resolve),
								meta: {
									title: "预警管理",
									nav: "我的预警",
									breadCrumb: [{
											name: "预警管理",
											path: "",
										},
										{
											name: "无抗菌处方权预警",
											path: "",
										},
									],
								},
							}
						]
					}
				]
			},
			{
				path: "maintenance",
				component: (resolve) =>
					require(["@/views/maintenance/index"], resolve),
				name: "Maintenance",
				redirect: '/maintenance/region-code',
				meta: {
					title: "运维管理",
				},
				children: [{
						path: 'manager-menu',
						component: (resolve) => require(["@/views/maintenance/pages/manager-menu/index"],
							resolve),
						meta: {
							title: "菜单管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "辖区编码",
									path: "",
								},
							],
						}
					},
					{
						path: 'region-code',
						component: (resolve) => require(["@/views/maintenance/pages/region-code/index"],
							resolve),
						meta: {
							title: "辖区编码",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "辖区编码",
									path: "",
								},
							],
						}
					},
					{
						path: 'org-info',
						component: (resolve) => require(["@/views/maintenance/pages/org-info/index"],
							resolve),
						meta: {
							title: "机构导入",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "机构导入",
									path: "",
								},
							],
						}
					},
					{
						path: 'physician-info',
						component: (resolve) => require(["@/views/maintenance/pages/physician-info/index"],
							resolve),
						meta: {
							title: "医师导入",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "医师导入",
									path: "",
								},
							],
						}
					},
					{
						path: 'nurse-info',
						component: (resolve) => require(["@/views/maintenance/pages/nurse-info/index"],
							resolve),
						meta: {
							title: "护士导入",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "护士导入",
									path: "",
								},
							],
						}
					},
					{
						path: 'warning-rule',
						component: (resolve) => require(["@/views/maintenance/pages/warning-rule/index"],
							resolve),
						meta: {
							title: "预警规则",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "预警规则",
									path: "",
								},
							],
						}
					},
					{
						path: 'dept',
						component: (resolve) => require(["@/views/maintenance/pages/manager-dept/index"],
							resolve),
						meta: {
							title: "部门管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "部门管理",
									path: "",
								},
							],
						}
					},
          {
          	path: 'delete',
          	component: (resolve) => require(["@/views/maintenance/pages/manager-delete/index"],
          		resolve),
          	meta: {
          		title: "清除缓存",
          		nav: "运维管理",
          		breadCrumb: [{
          				name: "运维管理",
          				path: "",
          			},
          			{
          				name: "清除缓存",
          				path: "",
          			},
          		],
          	}
          },
          {
          	path: 'title',
          	component: (resolve) => require(["@/views/maintenance/pages/manager-title/index"],
          		resolve),
          	meta: {
          		title: "标题管理",
          		nav: "运维管理",
          		breadCrumb: [{
          				name: "运维管理",
          				path: "",
          			},
          			{
          				name: "标题管理",
          				path: "",
          			},
          		],
          	}
          },
					{
						path: 'dict',
						component: (resolve) => require(["@/views/maintenance/pages/manager-dict/index"],
							resolve),
						meta: {
							title: "字典管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "字典管理",
									path: "",
								},
							],
						}
					},
					{
						path: "dict-data/index/:dictId(\\d+)",
						component: (resolve) => require(["@/views/maintenance/pages/manager-dict/data"],
							resolve),
						hidden: true,
						name: "Data",
						meta: {
							title: "字典数据",
							activeMenu: "/maintenance/dict"
						},
					},
					{
						path: 'logininfor',
						component: (resolve) => require([
							"@/views/maintenance/pages/manager-logininfor/index"
						], resolve),
						meta: {
							title: "登录日志",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "登录日志",
									path: "",
								},
							],
						}
					},
					{
						path: 'online',
						component: (resolve) => require(["@/views/maintenance/pages/manager-online/index"],
							resolve),
						meta: {
							title: "在线用户",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "在线用户",
									path: "",
								},
							],
						}
					},
					{
						path: 'operlog',
						component: (resolve) => require(["@/views/maintenance/pages/manager-operlog/index"],
							resolve),
						meta: {
							title: "操作日志",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "操作日志",
									path: "",
								},
							],
						}
					},
					{
						path: 'post',
						component: (resolve) => require(["@/views/maintenance/pages/manager-post/index"],
							resolve),
						meta: {
							title: "岗位管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "岗位管理",
									path: "",
								},
							],
						}
					},
					{
						path: 'role',
						component: (resolve) => require(["@/views/maintenance/pages/manager-role/index"],
							resolve),
						meta: {
							title: "角色管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "角色管理",
									path: "",
								},
							],
						}
					},
					{
						path: "/maintenance-role/authUser/:roleId(\\d+)",
						hidden: true,
						component: (resolve) =>
							require(["@/views/maintenance/pages/manager-role/authUser"], resolve),
						name: "AuthUser",
						meta: {
							title: "分配用户",
							activeMenu: "/maintenance/role"
						},
					},
					{
						path: "/maintenance-user/authRole/:userId(\\d+)",
						component: (resolve) => require(["@/views/maintenance/pages/manager-user/authRole"],
							resolve),
						// component: Layout,
						hidden: true,
						name: "authRole",
						meta: {
							title: "分配角色",
							activeMenu: "maintenance/role"
						},

					},

					{
						path: 'server',
						component: (resolve) => require(["@/views/maintenance/pages/manager-server/index"],
							resolve),
						meta: {
							title: "服务监控",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "服务监控",
									path: "",
								},
							],
						}
					},
					{
						path: 'user',
						component: (resolve) => require(["@/views/maintenance/pages/manager-user/index"],
							resolve),
						meta: {
							title: "用户管理",
							nav: "运维管理",
							breadCrumb: [{
									name: "运维管理",
									path: "",
								},
								{
									name: "用户管理",
									path: "",
								},
							],
						}
					},



					//--------------------------------------------
				]
			},
			{
				path: "dw",
				component: (resolve) =>
					require(["@/views/dw/index"], resolve),
				name: "DW",
				redirect: '/dw/data-house',
				meta: {
					title: "数据仓库",
				},
				children: [{
						path: 'data-house',
						component: (resolve) => require(["@/views/dw/pages/data-house/index"], resolve),
						meta: {
							title: "数据汇总",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "数据汇总",
									path: "",
								},
							],
						}
					},
					{
						path: 'organization',
						component: (resolve) => require(["@/views/dw/pages/organization/index"], resolve),
						redirect: '/dw/organization/list',
						name: "organization",
						meta: {
							title: "医院机构列表",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "医院机构列表",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/organization/list"],
									resolve),
								meta: {
									title: "医院机构列表",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "医院机构列表",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require([
									"@/views/dw/pages/organization/detail"], resolve),
								meta: {
									title: "医院机构列表",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "医院机构详情",
											path: "",
										},
									],
								},
							}
						]
					},
					{
						path: 'physician',
						component: (resolve) => require(["@/views/dw/pages/physician/index"], resolve),
						redirect: '/dw/physician/list',
						meta: {
							title: "医务人员资质",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "医务人员资质",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/physician/list"],
									resolve),
								meta: {
									title: "医务人员资质",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "医务人员资质",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require(["@/views/dw/pages/physician/detail"],
									resolve),
								meta: {
									title: "医务人员资质",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "医务人员资质",
											path: "",
										},
										{
											name: "详情",
											path: "",
										},
									],
								},
							}
						]
					},
					{
						path: 'nurse',
						component: (resolve) => require(["@/views/dw/pages/nurse/index"], resolve),
						redirect: '/dw/nurse/list',
						meta: {
							title: "护士人员资质",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "护士人员资质",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/nurse/list"],
									resolve),
								meta: {
									title: "护士列表",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "护士人员资质",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require(["@/views/dw/pages/nurse/detail"],
									resolve),
								meta: {
									title: "护士人员资质",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "护士人员资质",
											path: "",
										},
										{
											name: "详情",
											path: "",
										},
									],
								},
							}
						]
					},
					{
						path: 'outpatient',
						component: (resolve) => require(["@/views/dw/pages/outpatient/index"], resolve),
						redirect: '/dw/outpatient/list',
						meta: {
							title: "就诊列表",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "就诊列表",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/outpatient/list"],
									resolve),
								meta: {
									title: "就诊列表",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "就诊列表",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require(["@/views/dw/pages/outpatient/detail"],
									resolve),
								meta: {
									title: "就诊列表",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "就诊列表",
											path: "",
										},
									],
								},
							}
						]
					},
					{
						path: 'prescription',
						component: (resolve) => require(["@/views/dw/pages/prescription/index"], resolve),
						redirect: '/dw/prescription/list',
						meta: {
							title: "处方列表",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "处方列表",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/prescription/list"],
									resolve),
								meta: {
									title: "处方列表",
									nav: "数据分类",
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "处方列表",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require([
									"@/views/dw/pages/prescription/detail"], resolve),
								meta: {
									title: "处方列表",
									nav: "数据分类",
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "处方列表",
											path: "",
										},
									],
								},
							}
						]
					},
					{
						path: 'drug-list',
						component: (resolve) => require(["@/views/dw/pages/drug-list/index"], resolve),
						meta: {
							title: "药品成分库",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "药品成分库",
									path: "",
								},
							],
						}
					},
					{
						path: 'warning',
						component: (resolve) => require(["@/views/dw/pages/warning/index"], resolve),
						redirect: '/dw/warning/list',
						meta: {
							title: "预警项",
							nav: '数据分类',
							breadCrumb: [{
									name: "数据仓库",
									path: "",
								},
								{
									name: "预警类型列表",
									path: "",
								},
							],
						},
						children: [{
								path: 'list',
								component: (resolve) => require(["@/views/dw/pages/warning/list"],
									resolve),
								meta: {
									title: "预警项",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "预警类型列表",
											path: "",
										},
									],
								},
							},
							{
								path: 'detail',
								component: (resolve) => require(["@/views/dw/pages/warning/detail"],
									resolve),
								meta: {
									title: "预警项",
									nav: '数据分类',
									breadCrumb: [{
											name: "数据仓库",
											path: "",
										},
										{
											name: "预警类型详情",
											path: "",
										},
									],
								},
							}
						]
					},
				]
			},
			{
				path: "pre-warning-statistics",
				component: (resolve) =>
					require(["@/views/pre-warning-statistics/index"], resolve),
				name: "PreWarningStatistics",
				redirect: '/pre-warning-statistics/pre-warning',
				meta: {
					title: "处置统计",
				},
				children: [{
						path: 'pre-warning',
						component: (resolve) => require([
							"@/views/pre-warning-statistics/pages/pre-warning/index"
						], resolve),
						meta: {
							title: "处置统计",
							nav: '处置统计',
							breadCrumb: [{
									name: "处置统计",
									path: "",
								},
								{
									name: "预警统计",
									path: "",
								},
							],
						}
					},
					{
						path: 'disposition',
						component: (resolve) => require([
							"@/views/pre-warning-statistics/pages/disposition/index"
						], resolve),
						meta: {
							title: "处置统计",
							nav: '处置统计',
							breadCrumb: [{
									name: "处置统计",
									path: "",
								},
								{
									name: "处置统计",
									path: "",
								},
							],
						}
					},
				]
			}
		],
	},
	{
		path: "/user",
		component: Layout,
		hidden: true,
		redirect: "noredirect",
		children: [{
			path: "profile",
			component: (resolve) =>
				require(["@/views/system/user/profile/index"], resolve),
			name: "Profile",
			meta: {
				title: "个人中心",
				icon: "user"
			},
		}, ],
	},
	{
		path: "/system/user-auth",
		component: Layout,
		hidden: true,
		children: [{
			path: "role/:userId(\\d+)",
			component: (resolve) =>
				require(["@/views/system/user/authRole"], resolve),
			name: "AuthRole",
			meta: {
				title: "分配角色",
				activeMenu: "/system/user"
			},
		}, ],
	},
	{
		path: "/system/role-auth",
		component: Layout,
		hidden: true,
		children: [{
			path: "user/:roleId(\\d+)",
			component: (resolve) =>
				require(["@/views/system/role/authUser"], resolve),
			name: "AuthUser",
			meta: {
				title: "分配用户",
				activeMenu: "/system/role"
			},
		}, ],
	},
	{
		path: "/system/dict-data",
		component: Layout,
		hidden: true,
		children: [{
			path: "index/:dictId(\\d+)",
			component: (resolve) => require(["@/views/system/dict/data"], resolve),
			name: "Data",
			meta: {
				title: "字典数据",
				activeMenu: "/system/dict"
			},
		}, ],
	},
	{
		path: "/monitor/job-log",
		component: Layout,
		hidden: true,
		children: [{
			path: "index",
			component: (resolve) => require(["@/views/monitor/job/log"], resolve),
			name: "JobLog",
			meta: {
				title: "调度日志",
				activeMenu: "/monitor/job"
			},
		}, ],
	},
	{
		path: "/tool/gen-edit",
		component: Layout,
		hidden: true,
		children: [{
			path: "index",
			component: (resolve) =>
				require(["@/views/tool/gen/editTable"], resolve),
			name: "GenEdit",
			meta: {
				title: "修改生成配置",
				activeMenu: "/tool/gen"
			},
		}, ],
	},
];

export default new Router({
	mode: "history", // 去掉url中的#
	scrollBehavior: () => ({
		y: 0
	}),
	routes: constantRoutes,
});
